<html xmlns:th="http://www.thymeleaf.org">


<body>
<head th:include="basePages/head::head">
</head>
	<!-- Page Wrapper -->
	<!-- In the PHP version you can set the following options from inc/config file -->
	<!--
            Available classes:

            'page-loading'      enables page preloader
        -->
	<div id="page-wrapper" class="page-loading">


			<!-- Main Container -->
			<div id="main-container">
				<!-- END Header -->

				<!-- Page content -->
				<div id="page-content">
					<!-- Table Styles Block -->
					<div class="block">
			
			<HR style="FILTER: progid:DXImageTransform.Microsoft.Shadow(color:#fff,direction:145,strength:20);color:rgb(133, 114, 154);width:100%;">
                        
			<!-- vertical tabs -->
			
			<div class="wxinfo"  th:fragment="wxinfo">
                                <table id="general-table" class="table table-striped table-bordered table-vcenter text-center" >
                                    <thead>
                                        <tr>
                                            <th class="text-center">所属公众号</th>
                                            <th class="text-center">文章名称</th>
                                            <th class="text-center">文章地址</th>
                                            <th class="text-center">生成时间</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                     <tr th:each="wxinfo,scrStar:${wxnameList}" >
                                            
                                            <td class="text-center" th:text="${wxinfo.wxname}"></td>
                                            <td class="text-center" th:text="${wxinfo.title}"></td>
                                            <td class="text-center"><a th:href="${wxinfo.path}">点击可查看文章</a></td>
                                            <td class="text-center" th:text="${wxinfo.creatTime}"></td>
                                            
                                        </tr>
                                    </tbody>
                                </table>
                                 <div class="text-right">
                                        <ul class="pagination pagination-sm">
                                        <li><span th:text="当前页数：+@{${pageInfo.page}}+，总共+@{${pageInfo.totalPages}}+页，+@{${pageInfo.totalElements}}+条数据"></span></li>
                                        <li><a type="button"  th:onclick="'search_shop(1,'+${pageInfo.size}+')'">首页</a></li>
                                        <li><a type="button"  th:onclick="'javascript:search_shop('+(${pageInfo.page}<=1 ?  1 : ${pageInfo.page}-1)+','+${pageInfo.size}+')'">上一页</a></li>
										<li><a type="button"  th:onclick="'javascript:search_shop('+(${pageInfo.page}>=${pageInfo.totalPages} ? ${pageInfo.totalPages} : ${pageInfo.page}+1)+','+${pageInfo.size}+')'">下一页</a></li>
                                        <li><a type="button" th:onclick="'javascript:search_shop('+${pageInfo.totalPages}+','+${pageInfo.size}+')'">尾页</a></li>
                                        <li><input type="text" id="pageself" value=""  placeholder=""  style="width:4rem;border: 1px solid #de4b39;font-size: 12px;line-height: 14px;margin-top: 4px;padding: 2px;color: #de4b39;" / ><span th:onclick="'return_search_shop('+${pageInfo.size}+','+${pageInfo.totalPages}+')'" style="float: right;">跳转</span></li>
                                        </ul>
                                    </div>
                       </div>
			
			
			<!-- //vertical tabs -->
			<div class="clear"></div>
			
			
        
                   
                   
						<!-- END Table Styles Content -->
					</div>
					<!-- END Table Styles Block -->
				</div>
				<!-- END Page Content -->
			</div>
		<!-- END Page Container -->
	</div>
	<!-- END Page Wrapper -->

	<div th:replace="basePages/footer :: footer"></div>
	<script>
	//选择高亮
		$(function() {
		});
		var search_shop=function(page,size){
         	//分页查询当前页面
     		$.ajax({
                 url:"freeSearchWechatInfoPageZone",
                 type:"POST",
                 data:{page:page,size:size},
                 success:function (data) {
                 	$(".wxinfo").html(data);
                 },
                 error:function (e) {
                     console.log(e);
                 }
                 ,timeout:function (e) {
                     console.log(e);
                 }
             }); 
         };
         var return_search_shop=function(size,totalpages){
          	var s=$("#pageself").val();
          	var scheck=parseInt(s);
          	if(isNaN(scheck)){
                  alert("页码只能是纯数字");
                  return;
              }
          	if(parseInt(s)>parseInt(totalpages)){
          		s=totalpages;
          	}
          	if(parseInt(s)<1){
          		s=1;
          	}
          	search_shop(s,size); 
          };
	</script>
	
</body>
</html>